<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
    <%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
    <%  
	String path = request.getContextPath();  
	String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";  
%> 
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Insert title here</title>
<link rel="stylesheet" type="text/css" href="/bsc/static/common/bootstrap/js/bootstrap-3.3.7-dist/css/bootstrap.min.css">
<link rel="stylesheet" type="text/css" href="/bsc/static/common/bootstrap/js/bootstrap-3.3.7-dist/css/bootstrap-theme.min.css">
<script src="/bsc/static/js/jquery-3.1.1.js"></script>
<script src="/bsc/static/common/bootstrap/js/bootstrap-3.3.7-dist/js/bootstrap.min.js"></script>

</head>
<body>
		<center>
			<form action="<%=basePath%>addproject" method="post" enctype="multipart/form-data" >
				<table class="table table-bordered">
					<tr>
						<td>项目姓名：</td>
						<td>
							<input type="text"  name="project_name"/>
						</td>
						<td>状态：</td>
						<td>
							<select name="status">
								<option value=""></option>
								<option value="1">在售</option>
								<option value="2">下架</option>
							</select>
						</td>
					</tr>
					<tr>
						<td>列表图片：</td>
						<td>
							<input type="file" value="上传" name="file"/>
						</td>
						<td>封面图片：</td>
						<td>
							<input type="file" value="上传" name="file"/>
						</td>
					</tr>
					<tr>
						<td>分类：</td>
						<td>
							<select name="type_id">
									<option value=""></option>
								<c:forEach items="${list}" var="t">
										<option value="${t.type_id }">${t.type_name }</option>
								</c:forEach>
							</select>
						</td>
						<td>所有设备：</td>
						<td>
							<input type="text" name="use_device"/>
						</td>
					</tr>
					<tr>
						<td>服务时长：</td>
						<td>
							<input type="text" id="zhi1" name="server_time"/>
							<input type="button" id="jian1" value="-"/>	
							<input type="button" id="jia1" value="+"/> 分钟
						</td>
						<td>人民币售价：</td>
						<td>
							<input type="text" id="zhi2" name="rmb_price"/>
							<input type="button" id="jian2" value="-"/>	
							<input type="button" id="jia2" value="+"/> 元
						</td>
					</tr>
					<tr>
						<td>颜值售价：</td>
						<td>
							<input type="text" id="zhi3" name="beauty_price"/>
							<input type="button" id="jian3" value="-"/>	
							<input type="button" id="jia3" value="+"/> 个
						</td>
						<td>标准手工费：</td>
						<td>
							<input type="text" id="zhi4" name="manual_price"/>
							<input type="button" id="jian4" value="-"/>	
							<input type="button" id="jia4" value="+"/> 元
						</td>
					</tr>
					<tr>
						<td>活动手工费：</td>
						<td>	
							<input type="text" id="zhi5" name="active_price"/>
							<input type="button" id="jian5" value="-"/>	
							<input type="button" id="jia5" value="+"/> 元
						</td>
						<td>排序号：</td>
						<td>
							<input type="text" id="zhi6" name="sort_no"/>
							<input type="button" id="jian6" value="-"/>	
							<input type="button" id="jia6" value="+"/> 个
						</td>
					</tr>
					<tr>
						<td >内容描述</td>
						<td colspan="3">
							<textarea rows="" cols="" name="content">
								
							</textarea>
						</td>
						
					</tr>
					<tr align="center">
						<td colspan="4">
							<input type="submit" value="提交" /> 
			   
							<input type="button" value="关闭" onclick="custom_close()"/>
						</td>
					</tr>
				</table>
			</form>
		</center>
</body>
</html>
<script type="text/javascript" src="/bsc/static/js/jquery-1.7.1.js">
</script>
<script type="text/javascript">

function custom_close(){
    if(confirm("您确定要关闭本页吗？")){
        window.opener=null;
        window.location.href = "<%=basePath%>selectproject";
        window.close();
    }
    else{
    }
}

$(function(){
	var zhi1= null;
	var zhi2= null;
	var zhi3= null;
	var zhi4= null;
	var zhi5= null;
	var zhi6 = null;
	$("#zhi1").val(zhi1);
	$("#jian1").on("click",function(){   
		if(zhi1>1){
			zhi1 = zhi1 - 1;
		}
		$("#zhi1").val(zhi1);
	});
	
	$("#jia1").on("click",function(){
		
			zhi1 = zhi1 + 1;
		
		$("#zhi1").val(zhi1);
	});
	
	$("#zhi2").val(zhi2);
	$("#jian2").on("click",function(){
		if(zhi2>1){
			zhi2 = zhi2 - 1;
		}
		$("#zhi2").val(zhi2);
	});
	
	$("#jia2").on("click",function(){
		
			zhi2 = zhi2 + 1;
		
		$("#zhi2").val(zhi2);
	});
	
	$("#zhi3").val(zhi3);
	$("#jian3").on("click",function(){
		if(zhi3>1){
			zhi3 = zhi3 - 1;
		}
		$("#zhi3").val(zhi3);
	});
	
	$("#jia3").on("click",function(){
		
			zhi3 = zhi3 + 1;
		
		$("#zhi3").val(zhi3);
	});
	
	
	$("#zhi4").val(zhi4);
	$("#jian4").on("click",function(){
		if(zhi4>1){
			zhi4 = zhi4 - 1;
		}
		$("#zhi4").val(zhi4);
	});
	
	$("#jia4").on("click",function(){
		
			zhi4 = zhi4 + 1;
		
		$("#zhi4").val(zhi4);
	});
	
	
	$("#zhi5").val(zhi5);
	$("#jian5").on("click",function(){
		if(zhi5>1){
			zhi5 = zhi5 - 1;
		}
		$("#zhi5").val(zhi5);
	});
	
	$("#jia5").on("click",function(){
		
			zhi5 = zhi5 + 1;
		
		$("#zhi5").val(zhi5);
	});
	
	
	$("#zhi6").val(zhi6);
	$("#jian6").on("click",function(){
		if(zhi6>1){
			zhi6 = zhi6 - 1;
		}
		$("#zhi6").val(zhi6);
	});
	
	$("#jia6").on("click",function(){
		
			zhi6 = zhi6 + 1;
		
		$("#zhi6").val(zhi6);
	});
	
});

</script>
